<?php
/**
 * 报价单详情验证器
 */

namespace app\common\validate;

class OfferDetailValidate extends CommonBaseValidate {
	protected $rule = [
		'offer_id|报价单' => 'require',
		'school_id|学校' => 'require',
		'name|名称' => 'require',
		'money|总金额' => 'require',
		'status|状态' => 'require',

	];

	protected $message = [
		'offer_id.required' => '报价单不能为空',
		'school_id.required' => '学校不能为空',
		'name.required' => '名称不能为空',
		'money.required' => '总金额不能为空',
		'status.required' => '状态不能为空',

	];

	protected $scene = [
		'admin_add' => ['school_id', 'name', 'money', 'status'],
		'admin_edit' => ['id', 'school_id', 'name', 'money', 'status'],
		'admin_del' => ['id'],
		'admin_disable' => ['id'],
		'admin_enable' => ['id'],
		'api_add' => ['offer_id', 'school_id', 'name', 'money', 'status'],
		'api_info' => ['id'],
		'api_edit' => ['id', 'offer_id', 'school_id', 'name', 'money', 'status'],
		'api_del' => ['id'],
		'api_disable' => ['id'],
		'api_enable' => ['id'],
	];
}
